package com.team.controller;

import com.team.service.UserService;
import com.team.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping
@Slf4j

public class UserController {
    @Autowired
    private UserService userService;

    /**
     * 登录
     * @param studentId
     * @param password
     * @return
     */
    @GetMapping("/auth")
    public Result<String> Login(@RequestParam("student_id") String studentId,
                               @RequestParam("password") String password) {
        return Result.success(userService.Login(studentId, password));
    }
}
